<?php
/**
 * @Author: cai
 * @Date:   2019-04-20
 */
namespace Common\Model;
use Think\Model;

class MessageModel extends Model
{
    protected function _after_find(&$data, $option) {
        if(MODULE_NAME == 'Home' && LANG_SET == 'en-us'){
            $data['name'] = $data['en_name'];
            $data['company'] = $data['en_company'];
            $data['msg'] = $data['en_msg'];
        }
    }

    protected function _after_select(&$resultSet,$options) {
        foreach ($resultSet as &$data) {
            $this->_after_find($data, $options);
        }
    }
}
